//
//  OldImageDetail.m
//  Shengzhuli
//
//  Created by FXGuo on 2017/7/24.
//  Copyright © 2017年 kamangkeji. All rights reserved.
//

#import "OldImageDetail.h"

@implementation OldImageDetail
- (id)copyWithZone:(NSZone *)zone
{
    OldImageDetail *model = [[OldImageDetail allocWithZone:zone] init];
    model.dynamicImageContent = self.dynamicImageContent;
    model.dynamicImage = self.dynamicImage;
    [model.dynamicImageList addObjectsFromArray:self.dynamicImageList];
    return model;
}
- (void)replaceTheOldModel:(OldImageDetail *)model
{
    self.dynamicImage = model.dynamicImage;
    self.dynamicImageContent = model.dynamicImageContent;
    [self.dynamicImageList removeAllObjects];
    [self.dynamicImageList addObjectsFromArray:model.dynamicImageList];
}
- (instancetype)initWithDict:(NSDictionary *)dict
{
    if (self = [super init]) {
        self.dynamicImage = dict[@"dynamicImage"];
        self.dynamicImageContent = dict[@"dynamicImageContent"];
        [self.dynamicImageList addObjectsFromArray:dict[@"dynamicImageList"]];
    }
    return self;
}

+ (instancetype)objectWithDict:(NSDictionary *)dict
{
    return [[OldImageDetail alloc]initWithDict:dict];
}

- (NSMutableArray *)dynamicImageList
{
    if (!_dynamicImageList) {
        _dynamicImageList = [NSMutableArray array];
    }
    return _dynamicImageList;
}

@end
